<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<div class="pageContent">
	<form method="post" action="<c:url value='/delivery/edit?navTabId=deliveryList&callbackType=closeCurrent'/>"
		class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
		<input type="hidden" name="id" value="${delivery.id}" />
		<input type="hidden" name="audit" value="${delivery.audit}" />
		<div class="pageFormContent" layoutH="56">
			<p>
				<label>单号：</label> <input name="orderNo" class="required" type="text" size="30" value="${delivery.orderNo}"
					lookupGroup="" <c:if test="${sessionInfo.role == '商务'}">readonly="readonly"</c:if> />
				<c:if test="${sessionInfo.role != '商务'}">
					<a class="btnLook" href="<c:url value='/showSalesOrderLookup'/>" lookupGroup="">查找带回</a>
				</c:if>
			</p>
			<p>
				<label>时间：</label> <input name="orderDate" class="required <c:if test="${sessionInfo.role != '商务'}">date</c:if>"
					type="text" readonly="true" dateFmt="yyyy-M-d" value="${delivery.orderDate}" />
				<c:if test="${sessionInfo.role != '商务'}">
					<a class="inputDateButton" href="javascript:;">选择</a>
				</c:if>
			</p>
			<p>
				<label>业务员：</label> <input name="salesman" type="text" class="required" size="30" value="${delivery.salesman}"
					<c:if test="${sessionInfo.role != '商务'}">suggestFields="salesman" suggestUrl="<c:url value='/showSalesmanSuggest' />" lookupGroup="" </c:if>
					<c:if test="${sessionInfo.role == '商务' || sessionInfo.role == '技术员'}">readonly="readonly"</c:if> />
			</p>
			<p>
				<label>客户名称：</label> <input name="customer" type="text" class="required" size="30" value="${delivery.customer}"
					<c:if test="${sessionInfo.role == '商务'}">readonly="readonly"</c:if> />
			</p>
			<p>
				<label>产品明细：</label> <input name="product" type="text" class="required" size="30" value="${delivery.product}"
					<c:if test="${sessionInfo.role == '商务'}">readonly="readonly"</c:if> />
			</p>
			<p>
				<label>送货方式：</label> <select name="deliveryMethod" class="required combox">
					<option value="">请选择</option>
					<c:forEach var="item" items="${deliveryMethodList}">
						<option value="${item.method}" ${item.method eq delivery.deliveryMethod ? 'selected="selected"' : ''}>${item.method}</option>
					</c:forEach>
				</select>
			</p>
			<p>
				<label>送货日期：</label> <input name="deliveryDate" required <c:if test="${sessionInfo.role != '商务'}">date</c:if>
					type="text" readonly="true" dateFmt="yyyy-M-d" value="${delivery.deliveryDate}" />
				<c:if test="${sessionInfo.role != '商务'}">
					<a class="inputDateButton" href="javascript:;">选择</a>
				</c:if>
			</p>
			<p>
				<label>技术员：</label> <input name="technician" type="text" size="30" value="${delivery.technician}"
					<c:if test="${sessionInfo.role != '商务'}">suggestFields="technician" suggestUrl="<c:url value='/showTechnicianSuggest' />" lookupGroup="" </c:if>
					<c:if test="${sessionInfo.role == '商务'}">readonly="readonly"</c:if> />
			</p>
			<p>
				<label>出发时间：</label> <input name="deparTime" <c:if test="${sessionInfo.role != '商务'}">class="date"</c:if>
					type="text" readonly="true" dateFmt="HH:mm" value="${delivery.departTime}" />
				<c:if test="${sessionInfo.role != '商务'}">
					<a class="inputDateButton" href="javascript:;">选择</a>
				</c:if>
			</p>
			<p>
				<label>返回时间：</label> <input name="returnTime" <c:if test="${sessionInfo.role != '商务'}">class="date"</c:if>
					type="text" readonly="true" dateFmt="HH:mm" value="${delivery.returnTime}" />
				<c:if test="${sessionInfo.role != '商务'}">
					<a class="inputDateButton" href="javascript:;">选择</a>
				</c:if>
			</p>
			<p>
				<label>技术提成：</label> <input name="bonus" type="text" class="number" size="30" value="${delivery.bonus}"
					<c:if test="${sessionInfo.role == '商务'}">readonly="readonly"</c:if> />
			</p>
			<p>
				<label>司机：</label> <input name="driver" type="text" class="text" size="30" value="${delivery.driver}" lookupGroup="" />
				<a class="btnLook" href="<c:url value='/showDriverLookup'/>" lookupGroup="">查找带回</a>
			</p>
			<p>
				<label>司机电话：</label> <input name="driverPhone" type="text" class="text" size="30" value="${delivery.driverPhone}" />
			</p>
			<p>
				<label>送货花费：</label> <input name="cost" type="text" class="number" size="30" value="${delivery.cost}" />
			</p>
			<p>
				<label>所属月份：</label>
				<input name="abstractMonth" <c:if test="${sessionInfo.role != '商务'}">class="date"</c:if>
					type="text" readonly="true" dateFmt="yyyy-M" value="${delivery.abstractMonth}" />
				<c:if test="${sessionInfo.role != '商务'}">
					<a class="inputDateButton" href="javascript:;">选择</a>
				</c:if>
			</p>
			<p>
				<label>备注：</label> <input name="remarks" type="text" class="text" size="30" value="${delivery.remarks}" />
			</p>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive">
						<div class="buttonContent">
							<button type="submit">确定</button>
						</div>
					</div></li>
				<li><div class="button">
						<div class="buttonContent">
							<button type="button" class="close">取消</button>
						</div>
					</div></li>
			</ul>
		</div>
	</form>
</div>
